<template>
  <div class="count-main">
    <div class="count-box">
      <div class="number">
        {{ member }}
      </div>
      <div class="title">公众监督员注册数量</div>
    </div>
    <div class="count-box">
      <div class="number">
        {{ grider }}
      </div>
      <div class="title">网格员注册数量</div>
    </div>
    <div class="count-box">
      <div class="number">
        {{ aqiCount }}
      </div>
      <div class="title">AQI待检测数</div>
    </div>
  </div>
</template>

<script setup>
import $ajax8030 from '@/api/to8030.js'
import $ajax8060 from '@/api/to8060.js'
import { onMounted, ref } from 'vue'

const member = ref(0)
const grider = ref(0)
const aqiCount = ref(0)

onMounted(async () => {
  const path = '/member/select/count/'
  const res = await $ajax8030.get(path + '3')
  member.value = res.result
  const res2 = await $ajax8030.get(path + '2')
  grider.value = res2.result
  const res3 = await $ajax8060.get('/aqiFeedback/select/count')
  aqiCount.value = res3.result
})
</script>

<style scoped lang="scss">
@font-face {
  font-family: electronicFont;
  src: url(../../assets/font/DS-Digital/DS-DIGIT-4.ttf);
}
.count-main {
  width: 100%;
  height: 100%;
  display: flex;
  padding-top: 10px;
  padding-left: 10px;
  .count-box {
    width: 100%;
    flex: 3;
    text-align: center;
    padding-top: 15px;
    .number {
      font-size: 50px;
      color: white;
      font-family: electronicFont, sans-serif;
      font-weight: bold;
    }
    .title {
      margin-top: 10px;
      font-size: 16px;
      color: #d3d3d8;
    }
  }
}
</style>
